package com.xltt.vehicleControl.bean;

/**
 * @author zhaotengfei
 * @version 1.0.0
 * @created 2017/4/20 17:28
 */

public class VehicleState {
    private String vin;
    private Integer activateState;
    private Integer inhibitionState;
    private Integer ImmobilizationState;
    private Integer engineState;
    private Integer powerMode;
    private Integer svtState;
    private Integer positionUploadState;
    private Integer journalLogState;
    private Integer overheatState;
    private Integer liveDetectionState;
    private static final int JOURNEY_LOG_ON = 1;
    private static final int OVERHEAT_ON = 1;
    public static final int POSITION_UPLOAD_ON = 1;

    public VehicleState() {
    }

    public Integer getPositionUploadState() {
        return this.positionUploadState;
    }

    public void setPositionUploadState(Integer positionUploadState) {
        this.positionUploadState = positionUploadState;
    }

    public String getVin() {
        return this.vin;
    }

    public void setVin(String vin) {
        this.vin = vin;
    }

    public Integer getActivateState() {
        return this.activateState;
    }

    public void setActivateState(Integer activateState) {
        this.activateState = activateState;
    }

    public Integer getInhibitionState() {
        return this.inhibitionState;
    }

    public void setInhibitionState(Integer inhibitionState) {
        this.inhibitionState = inhibitionState;
    }

    public Integer getImmobilizationState() {
        return this.ImmobilizationState;
    }

    public void setImmobilizationState(Integer immobilizationState) {
        this.ImmobilizationState = immobilizationState;
    }

    public Integer getEngineState() {
        return this.engineState;
    }

    public void setEngineState(Integer engineState) {
        this.engineState = engineState;
    }

    public Integer getSvtState() {
        return this.svtState;
    }

    public void setSvtState(Integer svtState) {
        this.svtState = svtState;
    }

    public Integer getPowerMode() {
        return this.powerMode;
    }

    public void setPowerMode(Integer powerMode) {
        this.powerMode = powerMode;
    }

    public Integer getJournalLogState() {
        return this.journalLogState;
    }

    public void setJournalLogState(Integer journalLogState) {
        this.journalLogState = journalLogState;
    }

    public Integer getOverheatState() {
        return overheatState;
    }

    public void setOverheatState(Integer overheatState) {
        this.overheatState = overheatState;
    }

    public boolean isJournalLogEnabled() {
        return this.journalLogState != null && this.journalLogState.intValue() == 1;
    }

    public boolean isOverHeatEnabled() {
        return this.overheatState != null && this.overheatState.intValue() == OVERHEAT_ON;
    }

    public boolean isPositionUpload() {
        return this.positionUploadState == null || this.positionUploadState.intValue() == 1;
    }

    public Integer getLiveDetectionState() {
        return liveDetectionState;
    }

    public void setLiveDetectionState(Integer liveDetectionState) {
        this.liveDetectionState = liveDetectionState;
    }

    public boolean isLiveDetectionEnable(){
        return this.liveDetectionState != null && liveDetectionState.intValue() == 2;
    }
}

